﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="F102_Dm_benh_vien.aspx.cs" Inherits="DanhMuc_F102_Dm_benh_vien" %>
<%@ Import Namespace ="WebDS.CDBNames" %>
<%@ Import Namespace ="IP.Core.IPCommon" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <table cellspacing="0" cellpadding="2" style="width: 100%;" class="cssTable" border="0">
        <tr>
            <td class="cssPageTitleBG" colspan="3">
                <asp:Label ID="m_lbl_tieu_de" runat="server" CssClass="cssPageTitle" Text="Danh mục bệnh viện" />
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:ValidationSummary ID="vdsCategory" runat="server" CssClass="cssManField" Font-Bold="true" />
                <asp:Label ID="m_lbl_mess" runat="server" CssClass="cssManField" />
            </td>
        </tr>
        <tr>
            <td align="right" style="width: 15%;">
                <asp:Label ID="m_lbl_ten" CssClass="cssManField" runat="server" Text="&lt;U&gt;T&lt;/U&gt;ên bệnh viện" />
            </td>
            <td style="width: 30%;">
                <asp:TextBox ID="m_txt_ten_bv" runat="server" CssClass="cssTextBox"
                    Width="96%" />
            </td>
            <td style="width: 5%;">
                <asp:RequiredFieldValidator ID="m_cvt_ten_bv" runat="server" ControlToValidate="m_txt_ten_bv"
                    ErrorMessage="Bạn phải điền tên bệnh viện" Display="Static" Text="*" />
            </td>
        </tr>
        <tr>
            <td align="right" style="width: 15%;">
                <asp:Label ID="lblFullName" CssClass="cssManField" runat="server" Text="&lt;U&gt;Đ&lt;/U&gt;ịa chỉ " />
            </td>
            <td valign="middle" style="width: 30%;">
                &nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Label ID="Label1" CssClass="cssManField" runat="server" Text="Tỉnh " />
                <asp:DropDownList ID="m_cbo_tinh" runat="server" AutoPostBack="True" 
                    Width="200px" CssClass="cssDorpdownlist" 
                    onselectedindexchanged="m_cbo_tinh_SelectedIndexChanged" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Label ID="Label2" CssClass="cssManField" runat="server" Text="Huyện" />
                <asp:DropDownList ID="m_cbo_huyen" runat="server" AutoPostBack="True" 
                    Width="200px" CssClass="cssDorpdownlist" 
                    onselectedindexchanged="m_cbo_huyen_SelectedIndexChanged" />
            </td>
            <td style="width: 5%;">
                <asp:CustomValidator ID="m_ctv_huyen" runat="server" ControlToValidate="m_cbo_huyen"
                    ErrorMessage="Bạn phải chọn huyện" Display="Static" Text="*" />
            </td>
        </tr>
        <tr>
            <td>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="m_lbl_ghi_chu" runat="server" CssClass="cssManField" Text="Thông tin " />
            </td>
            <td align="left">
                <asp:TextBox ID="m_txt_thong_tin" AccessKey="m" runat="server" CssClass="cssTextBox"
                    Width="96%" TextMode="MultiLine" Height="52px" />
            </td>
        </tr>
        <tr>
            <td align="right">
                &nbsp;
            </td>
            <td valign="top" colspan="2">
                <asp:HiddenField ID="m_hdf_id_dm_tu_dien" runat="server" Visible="False" />
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td colspan="2" align="left">
                <asp:Button ID="m_cmd_tao_moi" AccessKey="c" CssClass="cssButton" runat="server"
                    Width="98px" Text="Tạo mới(c)" OnClick="m_cmd_tao_moi_Click" Height="22px" />&nbsp;
                <asp:Button ID="m_cmd_cap_nhat" AccessKey="u" CssClass="cssButton" runat="server"
                    Width="98px" Text="Cập nhật(u)" OnClick="m_cmd_cap_nhat_Click" Height="22px" />&nbsp;
                <asp:Button ID="btnCancel" AccessKey="r" CssClass="cssButton" runat="server" Width="98px"
                    Text="Xóa trắng(r)" OnClick="btnCancel_Click" Height="22px" />
            </td>
        </tr>
        <tr>
            <td class="cssPageTitleBG" colspan="3">
                <asp:Label ID="m_lbl_tieu_de_2" runat="server" CssClass="cssPageTitle" Text="Danh sách từ điển hệ thống" />
            </td>
        </tr>
        <tr>
            <td align="left">
                <asp:Label ID="m_lbl_thong_bao" Visible="false" runat="server" CssClass="cssManField" />
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="3" style="height: 450px;" valign="top">
                <asp:GridView ID="m_grv_dm_benh_vien" runat="server" 
                    AutoGenerateColumns="False" Width="100%"
                    DataKeyNames="ID" OnRowDeleting="m_grv_dm_benh_vien_RowDeleting"
                    CellPadding="4" ForeColor="#333333" CssClass="cssGrid" 
                    onrowupdating="m_grv_dm_benh_vien_RowUpdating">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                    <asp:TemplateField HeaderText="Xóa">
                         <ItemTemplate>
                            <asp:LinkButton runat="server" ID="m_lbt_xoa" CommandName="Delete" 
                            OnClientClick="return confirm ('Bạn có thực sự muốn xóa ?')" ToolTip="Xóa" CausesValidation="false">
                            <center><img src="../Images/Button/deletered.png" width="20px" height="20px" alt="Xóa" /></center>
                            </asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Sửa">
                        <ItemTemplate>
                            <asp:LinkButton runat="server" ID="m_lbt_sua" CommandName="Update" ToolTip="Sửa" CausesValidation="false">
                            <center><img src="../Images/Button/edit.png" width="20px" height="20px" alt="Sửa" /></center>
                            </asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                        <asp:TemplateField HeaderText="STT" ItemStyle-HorizontalAlign="Center">
                            <ItemStyle Width="10%" />
                            <ItemTemplate>
                                <%# Container.DataItemIndex + 1 %></ItemTemplate>
                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:TemplateField>
                        <asp:BoundField DataField="TEN_DIA_PHUONG" HeaderText="Tên bệnh viện" ItemStyle-Width="30%">
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Địa chỉ"><ItemTemplate>
                                <%# get_maping_dia_chi(Eval(DM_DIA_PHUONG_BENH_VIEN.ID_DIA_PHUONG_CHA))%></ItemTemplate>
                                <ItemStyle Width="20%" />
                                </asp:TemplateField>
                        <asp:BoundField DataField="GHI_CHU" ItemStyle-HorizontalAlign="Center" 
                            HeaderText="Thông tin">
                            <ItemStyle HorizontalAlign="Center" Width="20%"></ItemStyle>
                        </asp:BoundField>
                    </Columns>
                    <EditRowStyle BackColor="#7C6F57" />
                    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#810c15" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#E3EAEB" />
                    <SelectedRowStyle CssClass="cssSelectedRow" BackColor="#C5BBAF" Font-Bold="True"
                        ForeColor="#333333"></SelectedRowStyle>
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
